-- damage
-- created by zhuangsl
-- 伤害百分比增加或减少（瓦解射线、天界光束）

return {
    fetchProps = function(who, status, condition)
        local props  = {};
        local propId = PropM.getPropId("damage");
        local value  = tonumber(condition["value"]);
        local endRound = condition["end_round"];

        table.insert(props, { propId, 1, value, endRound, });

        return props;
    end,

    desc = function(who, status, condition)
        -- 获取状态描述
        local cfg = CombatStatusM.getStatusInfo(status);
        local desc = cfg.desc;

        -- 百分比，效果可能为负，显示统一为正数
        local value = condition["value"];
        value = math.modf(math.abs(value / 10));
        desc = string.gsub(desc, "{value}", value);

        return desc;
    end,
};
